import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_yn_goods/widgets/appbar/common_app_bar.dart';
import 'package:get/get.dart';

import 'agreement_logic.dart';

class AgreementPage extends StatelessWidget {
  final logic = Get.put(AgreementLogic());

  @override
  Widget build(BuildContext context) {
    return GetBuilder<AgreementLogic>(builder: (logic) {
      return Scaffold(
        appBar: CommonAppBar(title: logic.agreement.title ?? ""),
        body: (logic.agreement.content ?? '').isEmpty
            ? const SizedBox()
            : SingleChildScrollView(
                child: Html(data: logic.agreement.content ?? ''),
              ),
      );
    });
  }
}
